package cn.layku.service.member;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

@SpringBootApplication
@EnableEurekaClient
@MapperScan("cn.layku.service.member.mapper")
public class ServiceMemberApplication implements CommandLineRunner {

    private final static Logger LOGGER = LoggerFactory.getLogger(ServiceMemberApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(ServiceMemberApplication.class, args);
    }

    @Value("${spring.profiles.active}")
    private String active;

    @Value("${server.port}")
    private String port;

    @Override
    public void run(String... args) {
        LOGGER.info("|--- order service is running,environment->{}, port->{} ---|", active, port);
    }

}
